using System;
using System.Collections.Generic;

namespace Genrsis.WorkitemTracking.Domain
{
    public class User : IIdentifiable
    {
        public string Id { get; set; }
        public string Username { get; set; }
        public int MembershipUserId { get; set; }
        
        public Workflow CreateWorkflow(string name)
        {
            var workflow = new Workflow(name, this.Id);
            return workflow;
        }

        public Workitem CreateWorkitem(string title, string description, Status status, User createdByUser, Workflow workflow)
        {
            var workitem = new Workitem
            {
                Title = title,
                Description = description,
                StatusId = status.Id,
                CreatedByUserId = createdByUser.Id,
                WorkflowId = workflow.Id
            };
            return workitem;
        }
    }
}